package com.fac.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 巡检计划表
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("inspection_plans")
@ApiModel(description = "巡检计划实体类")
public class InspectionPlan implements Serializable {

    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "计划ID", example = "1")
    private Long planId;

    @ApiModelProperty(value = "计划编号", example = "P202401010001", required = true)
    private String code;

    @ApiModelProperty(value = "计划名称", example = "设备日常巡检", required = true)
    private String name;

    @ApiModelProperty(value = "巡检周期：0每天，1每周，2每月，3每季度", example = "0", required = true)
    private Integer cycle;

    @ApiModelProperty(value = "巡检项目JSON字符串", example = "[{\"name\":\"外观检查\",\"checkPoints\":[\"外壳完整性\",\"标识清晰度\"],\"standardValue\":\"完好\",\"unit\":\"\"}]", required = true)
    private String items;

    @ApiModelProperty(value = "管理员ID", example = "1", required = true)
    private Long managerId;

    @ApiModelProperty(value = "状态：0禁用，1启用", example = "1", required = true)
    private Integer status;

    @ApiModelProperty(value = "创建时间", example = "2024-01-01 12:00:00")
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "更新时间", example = "2024-01-01 12:00:00")
    private LocalDateTime updatedAt;
} 